package StringDemo;

public class MinGanCiReplace {
    public static void main(String[] args) {
        //1.获取说的话
        String talk = "你玩的真好，下次别玩了，TMDSB";

        //3.定义一个敏感词库
        String[] arr = {"逼","TMD","CNM","SB","MLGB"};
        
        //4.循环得到数组中的每一个敏感词

        for (int i = 0; i < arr.length; i++) {
            //2.把talk里面的敏感词TMD替换为***
            talk = talk.replace(arr[i],"***");

        }
        System.out.println(talk);
    }
}
